package obj_.Datedemo;

import java.util.Date;

public class demo02 {
    public static void main(String[] args) {
        method3();
    }

    private static void method3() {
        //获取毫秒数，和System.currentTimeMillis()类似
        Date date = new Date();
        long l = date.getTime();
        System.out.println(l);
    }

    private static void method2() {
        //输入毫秒值，转换为日期
        Date date = new Date(0L);
        System.out.println(date);
    }

    private static void method() {
        Date date = new Date();
        System.out.println(date);
    }
}
